User errors in alarms are marked as retryCountsAgainstLimit#6443
User errors in alarms are marked as retryCountsAgainstLimit#6443
Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds isExceptionJsgError to detect user-generated jsg.Error exceptions in alarm error descriptions, ensuring they count against retry limits.
Findings (by severity):
- [MEDIUM] The header comment claims the function strips
"remote."prefixes, but the implementation only strips"remote exception: "— not the"remote."prefix thatannotateBroken()can produce. The comment should match the actual behavior, or (better) the function should handle"remote."too. - [MEDIUM] Consider reusing
tunneledErrorType()instead of re-implementing prefix stripping — it already handles"remote.","expected ", and"broken."prefixes correctly, and would be more robust against future format changes. - [LOW] No unit tests for
isExceptionJsgError. The function does non-trivial string parsing with a loop; tests for the key cases (plainjsg.Error, withbroken.*prefix, withremote exception:prefix, negative cases likejsg-internal.Error,jsg.TypeError, and malformedbroken.without delimiter) would increase confidence.
This review was generated by an AI assistant and may contain inaccuracies.
|
I'm Bonk, and I've done a quick review of your PR. This PR adds Findings posted as inline review comments (by severity):
|
e376767 to
e60199e
Compare
|
The code is consistent. Both error-handling paths (the exception catch at line 540 and the output lock failure at line 609) use the same pattern with Let me verify one more subtle thing — the Looking at line 18-19 of BUILD.bazel, However, there's an issue: the test only uses symbols from Let me now check if there are any remaining issues I should flag. The comment at line 176 says "starts with 'Error'" but the code checks Let me think about whether this change needs a compat flag or autogate. This is a behavioral change in how alarm retries are classified — user-thrown
This doesn't need a compat flag because it's fixing incorrect server-side behavior, not changing the JS API contract. It also doesn't seem risky enough to need an autogate since it's narrowly scoped to All my previous review findings have been addressed. The implementation is clean, uses LGTM |
f19ad88 to
d5ba916
Compare
|
Everything looks consistent and correct. The implementation is clean, the test coverage is comprehensive, and the previous review findings have been addressed. The approach of not using LGTM |
d5ba916 to
22fb2f7
Compare
|
The implementation is clean and correct. The prefix stripping order is correct: first One subtle observation: But wait - there's actually an edge case here. If someone has I've completed my analysis. The PR is well-structured, addresses the previous review feedback, has comprehensive tests, and the behavioral changes are correct. The LGTM |
d58c2e1 to
5e94a50
Compare
There was a problem hiding this comment.
Findings (by severity):
- [MEDIUM] Inconsistent
"remote exception: "prefix handling between the two error paths — the first path (line 577) checks the raw description, the second path (line 622) strips the prefix first. - [MEDIUM] kentonv's feedback about reusing
tunneledErrorType()(from a previous revision) is still not addressed — inlinestartsWith("jsg."_kj)is still ad-hoc string parsing, just moved from a helper function into the call sites. - [LOW] The user-error classification logic is duplicated across both error paths; a small helper would prevent them from diverging.
This review was generated by an AI assistant and may contain inaccuracies.
|
I'm Bonk, and I've done a quick review of your PR. This PR shifts alarm error classification from string-parsing a dedicated Findings posted as inline review comments (by severity):
|
c15fcf3 to
c1f8449
Compare
Ensures we are setting broken. user exceptions as EXCEPTION_IS_USER_ERROR for correct classification.
Checks if an exception is generated from user code, and classifies it correctly.
c1f8449 to
590ab60
Compare
|
LGTM |
|
Changed how the user error classification was done. This version will consider user errors plain |
This PR adds a
isExceptionJsgErrorto check if an exception was generated by a user, marking it correctly asretryCountsAgainstLimitinrunAlarm.